package com.nbjtjc.safe.bean.runnable;

import com.nbjtjc.safe.service.sys.SysPostService;

import java.util.concurrent.Callable;

/**
 * @auther guqianbin
 * @date 2018/8/9 9:27
 **/
public class InitPostRunnable implements Callable<Boolean> {
    private SysPostService sysPostService;
    private int fromCompanyId;
    private int toCompanyId;

    public InitPostRunnable() {
    }

    public InitPostRunnable(SysPostService sysPostService
            , int fromCompanyId, int toCompanyId) {
        this.sysPostService = sysPostService;
        this.fromCompanyId = fromCompanyId;
        this.toCompanyId = toCompanyId;
    }

    @Override
    public Boolean call() throws Exception {
        if(sysPostService.copySysPost(fromCompanyId,toCompanyId)){
            return true;
        }
        return false;
    }
}
